package pencil.service;

import java.sql.SQLException;
import java.util.ArrayList;

import pencil.dao.pencil_dao;
import pencil.to.blackSimTO;
import pencil.to.cuttingMachineTO;
import pencil.to.factoryMaterial1TO;
import pencil.to.holeMachineTO;
import pencil.to.holeNamuTO;
import pencil.to.insertMachineTO;
import pencil.to.paintingMachineTO;
import pencil.to.pencilTO;

import pencil.to.factoryMaterial2TO;

import pencil.to.mixMachineTO;


public class pencil_service {
	
	
	private pencil_dao dao;
	
	public pencil_service(pencil_dao dao){
		this.dao = dao;
	}
	
	public factoryMaterial1TO getMeterial(){	
		return dao.getMeterial();//재료 값을 가지고 온다.
	}
	
	public factoryMaterial2TO getNamuStore() throws SQLException{
		return dao.getNamuStore();
	}

	public void insertSetMeterial(factoryMaterial1TO fto) throws SQLException{	
			dao.insertSetMeterial(fto);//재료를 주문한다.
	}

	public mixMachineTO selectMixMachineInfo() {
			return dao.selectMixMachineInfo();
	} 

	public void insertNamuStore(factoryMaterial2TO fto2) throws SQLException{
		dao.insertNamuStore(fto2);
	}
	
	public void	insertMixMachineInfo(mixMachineTO mmto) throws SQLException{
			dao.insertMixMachineInfo(mmto);
	}
	
	public void insertHoleMInfo(holeMachineTO hmto)throws SQLException{
		dao.insertHoleMInfo(hmto);
	}
	
	public holeMachineTO selectHoleMInfo()throws SQLException{
		return dao.selectHoleMInfo();
	}
	
	
	
//	insert머신 service
	public void insertInsertMInfo(insertMachineTO imto)throws SQLException{
		dao.insertInsertMInfo(imto);
	}
	
	public insertMachineTO selectInsertMInfo()throws SQLException{
		return dao.selectInsertMInfo();
	}
	
//	cutting머신 service
	
	public void insertCuttingMInfo(cuttingMachineTO cmto)throws SQLException{
		dao.insertCuttingMInfo(cmto);
	}
	
	public cuttingMachineTO selectCuttingMInfo()throws SQLException{
		return dao.selectCuttingMInfo();
	}
	
//	painting머신 service
	
	public void insertPaintingMInfo(paintingMachineTO pmto)throws SQLException{
		dao.insertPaintingMInfo(pmto);
	}
	
	public paintingMachineTO selectPaintingMInfo()throws SQLException{
		return dao.selectPaintingMInfo();
	}
	
//	완성 연필 service
	
	public void insertPencil(pencilTO pto)throws SQLException{
		dao.insertPencil(pto);
	}
	
	public pencilTO selectPencil()throws SQLException{
		return dao.selectPencil();
	}
	
	
	
//	가공된 재료들 service
	public void insertHoleNamu(holeNamuTO hnto) throws SQLException{
		dao.insertHoleNamu(hnto);
	}
	
	public holeNamuTO selectHoleNamu() throws SQLException{
		return dao.selectHoleNamu();
	}
	
	public void insertblackSim(blackSimTO bsto) throws SQLException{
		dao.insertblackSim(bsto);
	}//흑심창고
	
	public blackSimTO selectblackSim() throws SQLException{
		return dao.selectblackSim();
	}

	public ArrayList<mixMachineTO> selectMixMachineInfoReport(int num) {
		
		return (ArrayList<mixMachineTO>) dao.selectMixMachineInfoReport(num);
	}

	public ArrayList<factoryMaterial1TO> selectMeterialReport(int stratMeterialNum) {
	
		return (ArrayList<factoryMaterial1TO>) dao.selectMeterialReport(stratMeterialNum);
	}
	
	
	
	
	/*
	 * 
	 * 
	 * public recipeListTO selectRecipeByLowCategoryId(String id , int page) throws SQLException{
		ArrayList<recipeTO> list =  dao.selectRecipeByLowCategoryId(id,page);
		
		int totalContent = dao.selectTotalRecipeByL_Id(id);
		recipePagingTO pagingTO = new recipePagingTO(totalContent, page);
		recipeListTO lto = new recipeListTO(list, pagingTO);
		return lto;
		
	}
	
	public ArrayList getMaterial() throws SQLException{
		return dao.selectMaterial();
	}
	
	public materialTO getMaterialByName(String name) throws SQLException{
		return dao.selectMaterialByName(name);
	}
	public HashMap getR_M_byName(String r_id,String m_id)throws SQLException{
		return dao.selectR_M_byName(r_id, m_id);
	}
	
	public HashMap getM_M_byName(String mt_id,String mk_id)throws SQLException{
		return dao.selectM_M_byName(mt_id ,mk_id);
	}
	
	public ArrayList<materialTO> getR_M_ByRecipeId(String r_id)throws SQLException{
		return dao.selectR_M_ByRecipeId(r_id);
	}
	*/

	
	
	
}
